import { axios } from '@/utils/request'

/**
 * 代理列表
 * @param {*} data
 * @returns
 */
export function optionListApi(data) {
  return axios({
    url: `/ad/ad/option`,
    method: 'get',
    params: data,
  })
}


/**
 * 区域设置 -- 保存
 * @param {*} data
 * @returns
 */
export function optionSetSaveApi(data) {
  return axios({
    url: `/ad/ad/optionsave`,
    method: 'post',
    data: data,
  })
}


// 等级列表
export function levelList(parameter) {
  return axios({
    url: `/ad/ad/levellist`,
    method: 'get',
    params: parameter,
  })
}


/**
 * 等级编辑
 * @param {*} id
 * @returns
 */
export function levelInfoApi(id) {
  return axios({
    url: `/ad/ad/getinfol&id=${id}`,
    method: 'get',
  })
}


/**
 * 等级编辑 --保存
 * @param {*} data
 * @returns
 */
export function levelSaveApi(data) {
  return axios({
    url: `/ad/ad/savel`,
    method: 'post',
    data: data,
  })
}


// 兑换明细
export function moneyDetailList(parameter) {
  return axios({
    url: `/ad/ad/moneydetaillist`,
    method: 'get',
    params: parameter,
  })
}
































/**
 * 代理列表 -- 代理商保存
 * @param {*} data
 * @returns
 */
export function agentSaveApi(data) {
  return axios({
    url: `/area/area-agent/agent-save`,
    method: 'post',
    data: data,
  })
}

/**
 * 代理列表 -- 代理商详情
 * @param {*} id
 * @returns
 */
export function agentInfoApi(id) {
  return axios({
    url: `/area/area-agent/get-info&id=${id}`,
    method: 'get',
  })
}

/**
 * 代理列表 -- 代理商删除
 * @param {*} id
 * @returns
 */
export function agentDeleteApi(id) {
  return axios({
    url: `/area/area-agent/agent-delete&id=${id}`,
    method: 'get',
  })
}

/**
 * 区域设置 -- 详情
 * @returns
 */
export function levelSetInfoApi() {
  return axios({
    url: `/area/area-level-set/list`,
    method: 'get',
  })
}

/**
 * 区域设置 -- 保存
 * @param {*} data
 * @returns
 */
export function levelSetSaveApi(data) {
  return axios({
    url: `/area/area-level-set/save`,
    method: 'post',
    data: data,
  })
}

/**
 * 分红明细
 * @param {*} data
 * @returns
 */
export function bonusListApi(data) {
  return axios({
    url: `/area/area-agent/bonus-list`,
    method: 'get',
    params: data,
  })
}

/**
 * 积分释放
 * @param {*} data
 * @returns
 */
export function integralFreeListApi(data) {
  return axios({
    url: `/area/area-agent/integral-free`,
    method: 'get',
    params: data,
  })
}

/**
 * 区域业绩
 * @param {*} data
 * @returns
 */
export function areaPerformanceListApi(data) {
  return axios({
    url: `/area/area-agent/area-performance`,
    method: 'get',
    params: data,
  })
}

/**
 * 推荐奖励
 * @param {*} data
 * @returns
 */
export function profitListApi(data) {
  return axios({
    url: `/area/area-agent/profit-list`,
    method: 'get',
    params: data,
  })
}
